package com.masterclient.app.modules.order.contract;

import com.eoner.baselibrary.base.BasePresenter;
import com.eoner.baselibrary.base.BaseView;
import com.eoner.baselibrary.bean.order.AliPayInfoBean;
import com.eoner.baselibrary.bean.order.ConfirmBean;
import com.eoner.baselibrary.bean.order.ConfirmPriceBean;
import com.eoner.baselibrary.bean.order.InvoiceBean;
import com.eoner.baselibrary.bean.order.WxPayInfoBean;
import com.masterclient.app.modules.order.beans.ConfirmCartBean;

import java.util.Map;

/**
 * 作者：sean
 * 创建时间：2017/7/24 09:55
 * 功能说明：
 */

public interface ConfirmContract {

    interface View extends BaseView {
      void confirmOrderResult(ConfirmBean.DataBean dataBean);
        void setWxPrePayInfo(WxPayInfoBean.DataBean dataBean);
        void setAliPrePayInfo(AliPayInfoBean.DataBean dataBean);
        void confirmGoodsFailed(String msg);
        void confirmCartSuccess(ConfirmCartBean.DataBean dataBean);
        void confirmPriceSuccess(ConfirmPriceBean.DataBean dataBean);
        void generateOrderFailed(String msg);
        void buyRightNowFail(String msg);
    }


    abstract static class Presenter extends BasePresenter<View> {

        @Override
        public void onStart() {

        }
        public abstract void aliPrepay(String trade_no);
        public abstract void wxPrepay(String trade_no);

        public abstract void buyRightNow(String address_id,String product_id,String buy_num,String is_group_buy,String is_original_price,String team_id,String is_offline);
        public abstract void confirmGoods(String customerid,String address_id, String[] product_id,String is_group_buy,String is_original_price,String team_id,String is_offline);

        public abstract void confirmOrderPrice(String address_id,String balance,String bupiao,String productId,String buy_num,String[] product_id,String salesrule_id,String is_group_buy,String is_original_price,String team_id,String is_offline,String gold,String customs_clearance_id);

        public abstract void generateOrder(String is_join_partner,String address_id, String balance, String bupiao, String product_id, Map<String,InvoiceBean> invoices,
                                           String[] product_ids, Map<String,String> remarks,String salesrule_id,String is_group_buy,String is_original_price,
                                           String team_id,String is_offline,String gold,String customs_clearance_id,String customs_clearance_Agreement);
    }
}